package com.jia.lidao.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.jia.lidao.R;
import com.jia.lidao.widget.CommonTitleBar;
import com.jia.lidao.widget.zoom.PhotoView;
import com.nostra13.universalimageloader.core.ImageLoader;

/**
 * Created by jia on 18/1/10.
 */

public class ImageActivity extends BaseActivity {

    private CommonTitleBar titleBar;
    private PhotoView photoView;
    private String url;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_img);
        url=getIntent().getStringExtra("url");
        initView();
    }

    private void initView(){
        titleBar=(CommonTitleBar)findViewById(R.id.common_title_bar);
        titleBar.setTitle("查看图片");
        photoView=(PhotoView)findViewById(R.id.photoview);
        ImageLoader.getInstance().displayImage(url,photoView);
    }
}
